
{extend name="public:base"/}

{block name="title"}角色列表{/block}
{block name="style"}{/block}

{block name="main"}
<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header m-b-sm">
                    <h3 class="box-title">角色列表</h3>
                </div>

                <div class="box-body table-responsive">

                    <div class="menu-buttons m-b-sm">
                        <a href="{:url('admin/role/create')}" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i>新增角色</a>
                    </div>

                    <table id="table-index" class="table table-hover"><thead>
                    <tr>
                        <th style="width: 20%;">角色名称</th>
                        <th style="width: 10%;">ID</th>
                        <th style="width: 10%;">是否启用</th>
                        <th style="width: 10%;">操作</th>
                    </tr>

                    </thead>
                        <tbody>
                        <?php if(!empty($roleData)){ foreach($roleData as $k=>$v){?>

                        <tr class="treegrid-<?=$v['id']?> <?=$v['parent_id'] == 0?'':'treegrid-parent-'.$v['parent_id']?>"  data-key="<?=$v['id']?>">
                            <td>
                                <span class="m-l-sm"><?=$v['role_name']?></span>
                            </td>
                            <td><?=$v['id']?></td>
                            <td><?=$v['status']?></td>
                            <td>
                                <a class="btn btn-primary btn-xs" href="{:url('admin/role/update',['id'=>$v['id']])}">编辑</a>
                                <a class="btn btn-danger btn-xs" href="{:url('admin/role/delete',['id'=>$v['id']])}" onclick="ptyConfirmDelete('{:url('admin/role/delete')}',{$v['id']});return false;">删除</a>
                            </td>
                        </tr>

                        <?php }} ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
</section>
{/block}

{block name="js"}
{/block}

